<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>任务中心</title>
    <meta charset="utf-8">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__CSS__/public.min.css">
    <style>
        .spf {
            float: right;
            color: #666;
            font-weight: normal;
            font-size: 12px;
        }
    </style>
</head>
<body ontouchstart>
<div class="page page--taskcenter">
    <div class="header">
        <div class="header__hd"><a class="iconfont mb-mobile-back"></a></div>
        <h1 class="header__title">任务中心<span class="header__subtitle"></span></h1>
    </div>
    <div class="page__bd">
        <div class="cells">
            <div class="heading">每日任务<span class="spf">日任务，每日0点更新任务</span></div>
            <div class="list">
                <div class="list-item pd_sign">
                    <div class="list-item__hd">
                        <div class="list-item__avatar"><img src="/public/static/img/task/b1.png" alt=""></div>
                    </div>
                    <div class="list-item__bd">
                        <div class="list-item__title"><span class="text-vip">+2G币</span></div>
                        <div class="list-item__desc">个人中心，每日签到</div>
                    </div>
                    <div class="list-item__ft"></div>
                </div>
                <div class="list-item pd_time">
                    <div class="list-item__hd">
                        <div class="list-item__avatar"><img src="/public/static/img/task/b2.png" alt=""></div>
                    </div>
                    <div class="list-item__bd">
                        <div class="list-item__title">
                            观看30分钟时长（1/1）<span class="text-vip">+2G币</span></div>
                        <div class="list-item__desc">累计观看30分钟的视频，快音不计时</div>
                    </div>
                    <div class="list-item__ft">
                        <div class="btn btn_primary">做任务</div>
                    </div>
                </div>
                <div class="list-item pd_share">
                    <div class="list-item__hd">
                        <div class="list-item__avatar"><img src="/public/static/img/task/b3.png" alt=""></div>
                    </div>
                    <div class="list-item__bd">
                        <div class="list-item__title"><span class="text-vip">+2G币</span></div>
                        <div class="list-item__desc">每天分享一部影片</div>
                    </div>
                    <div class="list-item__ft"></div>
                </div>
            </div>
        </div>
        <div class="cells mt10">
            <div class="heading">每月任务<span class="spf">月任务，每月1日更新任务</span></div>
            <div class="list">
                <div class="list-item pd_looks">
                    <div class="list-item__hd">
                        <div class="list-item__avatar"><img src="/public/static/img/task/b4.png" alt=""></div>
                    </div>
                    <div class="list-item__bd">
                        <div class="list-item__title"><span class="text-vip">+10G币</span></div>
                        <div class="list-item__desc">累计观看10部视频，快音不计时</div>
                    </div>
                    <div class="list-item__ft"></div>
                </div>
                <div class="list-item pd_zans">
                    <div class="list-item__hd">
                        <div class="list-item__avatar"><img src="/public/static/img/task/b5.png" alt=""></div>
                    </div>
                    <div class="list-item__bd">
                        <div class="list-item__title"><span class="text-vip">+5G币</span></div>
                        <div class="list-item__desc">每天点赞一部视频</div>
                    </div>
                    <div class="list-item__ft"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/common.js?v={$Think.config.commonJs}"></script>
<script>
    var str1 = '<div class="btn btn_primary go_to">做任务</div>';
    var str2 = '<div class="btn btn_default">已完成</div>';

    pd_sign();
    function pd_sign() {
        var item = $('.pd_sign');
        var btn = item.find('.list-item__ft');
        var title = item.find('.list-item__title');

        if (Cookies.get('pd_sign') == 1) {
            btn.html('<div class="btn btn_default">已签到</div>');
            title.html('每日签到（1/1）<span class="text-vip">+2G币</span>');
        } else {
            btn.html(str1);
            title.html('每日签到（0/1）<span class="text-vip">+2G币</span>');
        }
    }

    pd_time();
    function pd_time() {
        var item = $('.pd_time');
        var btn = item.find('.list-item__ft');
        var title = item.find('.list-item__title');

        if (Cookies.get('pd_look30m') >= totalPlayTime) {
            btn.html(str2);
            title.html('观看30分钟时长（1/1）<span class="text-vip">+2G币</span>');
        } else {
            btn.html(str1);
            title.html('观看30分钟时长（0/1）<span class="text-vip">+2G币</span>');
        }
    }

    pd_share();
    function pd_share() {
        var item = $('.pd_share');
        var btn = item.find('.list-item__ft');
        var title = item.find('.list-item__title');

        if (Cookies.get('pd_share') == 1) {
            btn.html(str2);
            title.html('分享影片（1/1）<span class="text-vip">+2G币</span>');
        } else {
            btn.html(str1);
            title.html('分享影片（0/1）<span class="text-vip">+2G币</span>');
        }
    }

    pd_looks();
    function pd_looks() {
        var item = $('.pd_looks');
        var btn = item.find('.list-item__ft');
        var title = item.find('.list-item__title');

        var num = 0;
        Cookies.get('pd_look10M') && (num = Cookies.get('pd_look10M'));

        num >= 5 ? btn.html(str2) : btn.html(str1);
        title.html('观看10部视频（' + num + '/10）<span class="text-vip">+10G币</span>');
    }

    pd_zans();
    function pd_zans() {
        var item = $('.pd_zans');
        var btn = item.find('.list-item__ft');
        var title = item.find('.list-item__title');

        var num = 0;
        Cookies.get('pd_zan5M') && (num = Cookies.get('pd_zan5M'));

        num >= 5 ? btn.html(str2) : btn.html(str1);
        title.html('点赞5部视频（' + num + '/5）<span class="text-vip">+5G币</span>');
    }

    $(".page__bd").on('click', '.go_to', function () {
        window.android._goBack("true");
    })
</script>
</body>
</html>